﻿@model DevWeb.Biztalk.DeploymentSettings.WebUI.Models.UserViewModel

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<div>
    <h4>User Details</h4>
    <hr />
    <dl class="dl-horizontal">
        <dt>
            @Html.DisplayNameFor(model => model.Username)
        </dt>

        <dd>
            @Html.DisplayFor(model => model.Username)
        </dd>

    </dl>
    @if (Model.UserRights.Count > 0)
    { 
    <div class="table-responsive ">
        <table class="table table-striped table-hover">
            <tr>
                <th class="col-md-8">
                    Environment
                </th>
                <th>Right</th>
               
            </tr>

            @foreach (var item in Model.UserRights)
            {
                <tr>
                    <td>
                        @item.Environment
                    </td>
                    <td>
                       
                        @item.Right
                    </td>
                </tr>
            }

        </table>
    </div>
    }
</div>
<p>
    @Html.ActionLink("Edit", "Edit", new { id = Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
